<?php
include 'bootstrap.php';

//控制器名称
$file_name = basename(__FILE__,'.php');
$controller = $_input->get('c',$file_name);
//动作名称
$action = $_input->get('a','index');

//登陆不判断权限，上传图片session 获取不到也不判断权限（暂时解决方法）
if(!in_array($action,array('login','adPictureUpload','newPictureUpload','newDirPicture'))){
    $user_info = Controller::getInstance('user')->needLogin();

    if(!in_array($controller,array('index'))){
        $is_action = Controller::getInstance('user')->isAction($controller);
    }
}
Controller::getInstance($controller)->{$action}();